package WarehouseTest;

import static org.junit.Assert.*;
import junit.framework.Assert;

import org.junit.Before;
import org.junit.Test;


public class testWarehouse {
private Warehouse wh;
protected Warehouse create_Warehouse(){
	return new WarehouseImple();
}


@Before protected void setup() {
	this.wh=create_Warehouse();
}
	
@Test public void test_lend_tool(){
	String toolName="";
	try {
		wh.lend_tool(toolName);
	} catch (Exception e) {
		fail("tools collection probably empty: " + e);
	}
}

@Test public void test_pull_ing(){
	String ingName="";
	try {
		wh.pull_ing(ingName);
	} catch (Exception e) {
		fail("Ingredient collection probably empty: " + e);
	}
}

@Test public void tool_avail(){
	String toolName="";
	Tool tool=new Tool();
	wh.add_tool(tool);
	assertTrue(wh.tool_avail(toolName));
	while(wh.tool_count(toolName)>0){
	wh.lend_tool(toolName);
	}
	assertFalse(wh.tool_avail(toolName));
}

@Test public void tool_count(){
	String toolName="";
	Tool tool=new Tool();
	int count=wh.tool_count(toolName);
	wh.lend_tool(toolName);
	assertTrue((count+1)==wh.tool_count(toolName));
	wh.add_tool(tool);
	assertFalse(count==wh.tool_count(toolName));
}

@Test public void add_tool(){
}


}
